 <gd:isPermit roles="SYSTEM_COMMENT" info="true">
<%@ page import="cn.gudian.cms.Comment.Comment" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title><g:message code="comment.list" default="Comment List"/></title>
  <script language="javascript" src="/js/list-min.js"></script>
</head>
<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}"><g:message code="home" default="Home"/></a></span>

</div>
<div class="body">
  <h1><g:message code="comment.list" default="Comment List"/></h1>
  <g:if test="${flash.message}">
    <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}"/></div>
  </g:if>
  <g:form action="deleteAll" name="listForm" method="post">
    <input type="hidden" name="qstr" id="qstr">
    <input type="hidden" name="mode" id="mode" value="${mode}">
    <input type="hidden" name="modeID" id="modeID" value="${modeID}">
    <div class="list">
      <table>
        <thead>
        <tr>
          <th width="30"><g:message code="chose" default="Chose"/></th>

          <g:sortableColumn property="id" title="Id" titleKey="comment.id"/>



          <g:sortableColumn property="name" title="Name" titleKey="comment.name"/>

          <g:sortableColumn property="contact" title="Contact" titleKey="comment.contact"/>

          <g:sortableColumn property="content" title="Content" titleKey="comment.content"/>

          <th width="30">回复</th>
        </tr>
        </thead>
        <tbody>
        <g:each in="${commentInstanceList}" status="i" var="commentInstance">
          <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
            <td><input name="listId" type="checkbox" id="listId" value="${commentInstance.id}"/></td>
            <td><g:link action="show" id="${commentInstance.id}">${fieldValue(bean: commentInstance, field: "id")}</g:link></td>
            <td>${fieldValue(bean: commentInstance, field: "name")}<gd:formatBoolean boolean="${commentInstance.audit}" true="&nbsp;" false="['未审核']" /></td>

            <td>${fieldValue(bean: commentInstance, field: "contact")}</td>

            <td>${fieldValue(bean: commentInstance, field: "content")}</td>

            <td><g:link action="edit" id="${commentInstance.id}"><img src="/images/skin/database_edit.png"/></g:link></td>
          </tr>
        </g:each>
        </tbody>
      </table>
    </div>
  </g:form>
  <div class="paginateButtons">
    <a href="javascript:selAll()"><g:message code="allChose" default="allChose"/></a> <a href="javascript:noSelAll()"><g:message code="cancel" default="Cancel"/></a><a href="javascript:delArc(0)">&nbsp;<g:message code="delete" default="Delete"/>&nbsp;</a><a href="javascript:audit(0)">&nbsp;审核&nbsp;</a>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<g:paginate total="${commentInstanceTotal}" params="${params}"/>
  </div>
</div>
</body>
</html>
</gd:isPermit>